////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2017 Qualcomm Technologies, Inc.
// All Rights Reserved.
// Confidential and Proprietary - Qualcomm Technologies, Inc.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @file  camxipetf10register.h
/// @brief CamX IQ TF register update declarations
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

#ifndef CAMXIPETF10REGISTER_H
#define CAMXIPETF10REGISTER_H

/// IQ Chromatix Headers
#include "tf_1_0_0.h"

/// IQ Setting Headers
#include "tf10setting.h"

/// Camx Headers
#include "camxipetf10.h"
#include "camxtypes.h"

CAMX_NAMESPACE_BEGIN

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetTFConfig0
///
/// @brief  Setup TF10 Register Config 0 based on common library output
///
/// @param  pTFData                Pointer to the Common Library Calculation Result
/// @param  pPassRegCmd            Pointer to the TF10 Register Set for the particular Pass
/// @param  resetReferenceInput    Indication to reset reference input for the particular Pass
///
/// @return None
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VOID SetTFConfig0(
    TF_REG*      pTFData,
    IPETFRegCmd* pPassRegCmd,
    BOOL         resetReferenceInput);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetTFConfig1
///
/// @brief  Setup TF10 Register Config 1 based on common library output
///
/// @param  pTFData                Pointer to the Common Library Calculation Result
/// @param  pPassRegCmd            Pointer to the TF10 Register Set for the particular Pass
/// @param  resetReferenceInput    Indication to reset reference input for the particular Pass
///
/// @return None
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VOID SetTFConfig1(
    TF_REG*      pTFData,
    IPETFRegCmd* pPassRegCmd,
    BOOL         resetReferenceInput);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetTFErodeConfig
///
/// @brief  Setup TF10 Register Erode Config based on common library output
///
/// @param  pTFData        Pointer to the Common Library Calculation Result
/// @param  pPassRegCmd    Pointer to the TF10 Register Set for the particular Pass
///
/// @return None
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VOID SetTFErodeConfig(
    TF_REG*      pTFData,
    IPETFRegCmd* pPassRegCmd);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetTFDilateConfig
///
/// @brief  Setup TF10 Register Dilate Config based on common library output
///
/// @param  pTFData        Pointer to the Common Library Calculation Result
/// @param  pPassRegCmd    Pointer to the TF10 Register Set for the particular Pass
///
/// @return None
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VOID SetTFDilateConfig(
    TF_REG*      pTFData,
    IPETFRegCmd* pPassRegCmd);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetTFCropInHorizontalStart
///
/// @brief  Setup TF10 Register CropIn Horizontal Start Config based on common library output
///
/// @param  pTFData        Pointer to the Common Library Calculation Result
/// @param  pPassRegCmd    Pointer to the TF10 Register Set for the particular Pass
///
/// @return None
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VOID SetTFCropInHorizontalStart(
    TF_REG*      pTFData,
    IPETFRegCmd* pPassRegCmd);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetTFCropInHorizontalEnd
///
/// @brief  Setup TF10 Register CropIn Horizontal End Config based on common library output
///
/// @param  pTFData        Pointer to the Common Library Calculation Result
/// @param  pPassRegCmd    Pointer to the TF10 Register Set for the particular Pass
///
/// @return None
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VOID SetTFCropInHorizontalEnd(
    TF_REG*      pTFData,
    IPETFRegCmd* pPassRegCmd);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetTFLNRStartIDXH
///
/// @brief  Setup TF10 Register LNR Start IDX Horizontal Config based on common library output
///
/// @param  pTFData        Pointer to the Common Library Calculation Result
/// @param  pPassRegCmd    Pointer to the TF10 Register Set for the particular Pass
///
/// @return None
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VOID SetTFLNRStartIDXH(
    TF_REG*      pTFData,
    IPETFRegCmd* pPassRegCmd);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetTFUpscaleCrop
///
/// @brief  Setup TF10 Register Upscale Crop Config based on common library output
///
/// @param  pTFData        Pointer to the Common Library Calculation Result
/// @param  pPassRegCmd    Pointer to the TF10 Register Set for the particular Pass
///
/// @return None
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VOID SetTFUpscaleCrop(
    TF_REG*      pTFData,
    IPETFRegCmd* pPassRegCmd);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetTFIndCropConfig
///
/// @brief  Setup TF10 Register Indication Crop Config based on common library output
///
/// @param  pTFData        Pointer to the Common Library Calculation Result
/// @param  pPassRegCmd    Pointer to the TF10 Register Set for the particular Pass
///
/// @return None
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VOID SetTFIndCropConfig(
    TF_REG*      pTFData,
    IPETFRegCmd* pPassRegCmd);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetTFPrngSeed
///
/// @brief  Setup TF10 Register Prng Seed Config based on common library output
///
/// @param  pTFData        Pointer to the Common Library Calculation Result
/// @param  pPassRegCmd    Pointer to the TF10 Register Set for the particular Pass
///
/// @return None
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VOID SetTFPrngSeed(
    TF_REG*      pTFData,
    IPETFRegCmd* pPassRegCmd);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetTFRefConfigs
///
/// @brief  Setup TF10 Register Reference Config 0-2 based on common library output
///
/// @param  pTFData        Pointer to the Common Library Calculation Result
/// @param  pPassRegCmd    Pointer to the TF10 Register Set for the particular Pass
///
/// @return None
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VOID SetTFRefConfigs(
    TF_REG*      pTFData,
    IPETFRegCmd* pPassRegCmd);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetTFCropInverts
///
/// @brief  Setup TF10 Register Crop Invert Start / End Config based on common library output
///
/// @param  pTFData        Pointer to the Common Library Calculation Result
/// @param  pPassRegCmd    Pointer to the TF10 Register Set for the particular Pass
///
/// @return None
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VOID SetTFCropInverts(
    TF_REG*      pTFData,
    IPETFRegCmd* pPassRegCmd);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetTFLNRStartIDXV
///
/// @brief  Setup TF10 Register LNR Start IDX Vertical Config based on common library output
///
/// @param  pTFData        Pointer to the Common Library Calculation Result
/// @param  pPassRegCmd    Pointer to the TF10 Register Set for the particular Pass
///
/// @return None
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VOID SetTFLNRStartIDXV(
    TF_REG*      pTFData,
    IPETFRegCmd* pPassRegCmd);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetTFLNRScale
///
/// @brief  Setup TF10 Register LNR Scale Config based on common library output
///
/// @param  pTFData        Pointer to the Common Library Calculation Result
/// @param  pPassRegCmd    Pointer to the TF10 Register Set for the particular Pass
///
/// @return None
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VOID SetTFLNRScale(
    TF_REG*      pTFData,
    IPETFRegCmd* pPassRegCmd);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetTFCropOutVertical
///
/// @brief  Setup TF10 Register Crop Out Vertical Config based on common library output
///
/// @param  pTFData        Pointer to the Common Library Calculation Result
/// @param  pPassRegCmd    Pointer to the TF10 Register Set for the particular Pass
///
/// @return None
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VOID SetTFCropOutVertical(
    TF_REG*      pTFData,
    IPETFRegCmd* pPassRegCmd);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetTFRefYConfig
///
/// @brief  Setup TF10 Register Reference Y Config based on common library output
///
/// @param  pTFData        Pointer to the Common Library Calculation Result
/// @param  pPassRegCmd    Pointer to the TF10 Register Set for the particular Pass
///
/// @return None
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VOID SetTFRefYConfig(
    TF_REG*      pTFData,
    IPETFRegCmd* pPassRegCmd);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetTFNoiseParamContribs
///
/// @brief  Setup TF10 Register Noise Parameter Contrib 0-16 Config based on common library output
///
/// @param  pTFData        Pointer to the Common Library Calculation Result
/// @param  pPassRegCmd    Pointer to the TF10 Register Set for the particular Pass
///
/// @return None
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VOID SetTFNoiseParamContribs(
    TF_REG*      pTFData,
    IPETFRegCmd* pPassRegCmd);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetTFNoiseParamContribYs
///
/// @brief  Setup TF10 Register Noise Parameter Contrib Y0-3 Config based on common library output
///
/// @param  pTFData        Pointer to the Common Library Calculation Result
/// @param  pPassRegCmd    Pointer to the TF10 Register Set for the particular Pass
///
/// @return None
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VOID SetTFNoiseParamContribYs(
    TF_REG*      pTFData,
    IPETFRegCmd* pPassRegCmd);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetTFNoiseParamContribCbs
///
/// @brief  Setup TF10 Register Noise Parameter Contrib Cb0-3 Config based on common library output
///
/// @param  pTFData        Pointer to the Common Library Calculation Result
/// @param  pPassRegCmd    Pointer to the TF10 Register Set for the particular Pass
///
/// @return None
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VOID SetTFNoiseParamContribCbs(
    TF_REG*      pTFData,
    IPETFRegCmd* pPassRegCmd);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetTFNoiseParamContribCrs
///
/// @brief  Setup TF10 Register Noise Parameter Contrib Cr0-3 Config based on common library output
///
/// @param  pTFData        Pointer to the Common Library Calculation Result
/// @param  pPassRegCmd    Pointer to the TF10 Register Set for the particular Pass
///
/// @return None
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VOID SetTFNoiseParamContribCrs(
    TF_REG*      pTFData,
    IPETFRegCmd* pPassRegCmd);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetTFNoiseParamUVLimit
///
/// @brief  Setup TF10 Register Noise Parameter UV Limit Config based on common library output
///
/// @param  pTFData        Pointer to the Common Library Calculation Result
/// @param  pPassRegCmd    Pointer to the TF10 Register Set for the particular Pass
///
/// @return None
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VOID SetTFNoiseParamUVLimit(
    TF_REG*      pTFData,
    IPETFRegCmd* pPassRegCmd);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetTFNoiseParamTopLimit
///
/// @brief  Setup TF10 Register Noise Parameter Top Limit Config based on common library output
///
/// @param  pTFData        Pointer to the Common Library Calculation Result
/// @param  pPassRegCmd    Pointer to the TF10 Register Set for the particular Pass
///
/// @return None
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VOID SetTFNoiseParamTopLimit(
    TF_REG*      pTFData,
    IPETFRegCmd* pPassRegCmd);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetTFNoiseParamBottomLimit
///
/// @brief  Setup TF10 Register Noise Parameter Bottom Limit Config based on common library output
///
/// @param  pTFData        Pointer to the Common Library Calculation Result
/// @param  pPassRegCmd    Pointer to the TF10 Register Set for the particular Pass
///
/// @return None
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VOID SetTFNoiseParamBottomLimit(
    TF_REG*      pTFData,
    IPETFRegCmd* pPassRegCmd);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetTFLNRLUTYs
///
/// @brief  Setup TF10 Register LNR LUT Y0-3 Config based on common library output
///
/// @param  pTFData        Pointer to the Common Library Calculation Result
/// @param  pPassRegCmd    Pointer to the TF10 Register Set for the particular Pass
///
/// @return None
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VOID SetTFLNRLUTYs(
    TF_REG*      pTFData,
    IPETFRegCmd* pPassRegCmd);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetTFLNRLUTCs
///
/// @brief  Setup TF10 Register LNR LUT C0-3 Config based on common library output
///
/// @param  pTFData        Pointer to the Common Library Calculation Result
/// @param  pPassRegCmd    Pointer to the TF10 Register Set for the particular Pass
///
/// @return None
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VOID SetTFLNRLUTCs(
    TF_REG*      pTFData,
    IPETFRegCmd* pPassRegCmd);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetTFFsDecisionParamsYs
///
/// @brief  Setup TF10 Register FS Decision Parameter Y0-8 Config based on common library output
///
/// @param  pTFData        Pointer to the Common Library Calculation Result
/// @param  pPassRegCmd    Pointer to the TF10 Register Set for the particular Pass
///
/// @return None
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VOID SetTFFsDecisionParamsYs(
    TF_REG*      pTFData,
    IPETFRegCmd* pPassRegCmd);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetTFFsDecisionParamsOOFs
///
/// @brief  Setup TF10 Register FS Decision Parameter OOF Y/C Config based on common library output
///
/// @param  pTFData        Pointer to the Common Library Calculation Result
/// @param  pPassRegCmd    Pointer to the TF10 Register Set for the particular Pass
///
/// @return None
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VOID SetTFFsDecisionParamsOOFs(
    TF_REG*      pTFData,
    IPETFRegCmd* pPassRegCmd);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetTFFsDecisionParamsCs
///
/// @brief  Setup TF10 Register FS Decision Parameter C0-8 Config based on common library output
///
/// @param  pTFData        Pointer to the Common Library Calculation Result
/// @param  pPassRegCmd    Pointer to the TF10 Register Set for the particular Pass
///
/// @return None
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VOID SetTFFsDecisionParamsCs(
    TF_REG*      pTFData,
    IPETFRegCmd* pPassRegCmd);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetTFA3T1T2Scale
///
/// @brief  Setup TF10 Register A3T1T2 Scale Config based on common library output
///
/// @param  pTFData        Pointer to the Common Library Calculation Result
/// @param  pPassRegCmd    Pointer to the TF10 Register Set for the particular Pass
///
/// @return None
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VOID SetTFA3T1T2Scale(
    TF_REG*      pTFData,
    IPETFRegCmd* pPassRegCmd);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetTFA3T1OFFS
///
/// @brief  Setup TF10 Register A3T1 OFFS Config based on common library output
///
/// @param  pTFData        Pointer to the Common Library Calculation Result
/// @param  pPassRegCmd    Pointer to the TF10 Register Set for the particular Pass
///
/// @return None
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VOID SetTFA3T1OFFS(
    TF_REG*      pTFData,
    IPETFRegCmd* pPassRegCmd);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetTFA3T2OFFS
///
/// @brief  Setup TF10 Register A3T2 OFFS Config based on common library output
///
/// @param  pTFData        Pointer to the Common Library Calculation Result
/// @param  pPassRegCmd    Pointer to the TF10 Register Set for the particular Pass
///
/// @return None
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VOID SetTFA3T2OFFS(
    TF_REG*      pTFData,
    IPETFRegCmd* pPassRegCmd);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetTFA2MinMax
///
/// @brief  Setup TF10 Register A2 Min/Max Config based on common library output
///
/// @param  pTFData        Pointer to the Common Library Calculation Result
/// @param  pPassRegCmd    Pointer to the TF10 Register Set for the particular Pass
///
/// @return None
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VOID SetTFA2MinMax(
    TF_REG*      pTFData,
    IPETFRegCmd* pPassRegCmd);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetTFA2Slope
///
/// @brief  Setup TF10 Register A2 Slope Config based on common library output
///
/// @param  pTFData        Pointer to the Common Library Calculation Result
/// @param  pPassRegCmd    Pointer to the TF10 Register Set for the particular Pass
///
/// @return None
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VOID SetTFA2Slope(
    TF_REG*      pTFData,
    IPETFRegCmd* pPassRegCmd);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetTFFsToA1A4Maps
///
/// @brief  Setup TF10 Register FS To A1A4 Map0-8 Config based on common library output
///
/// @param  pTFData        Pointer to the Common Library Calculation Result
/// @param  pPassRegCmd    Pointer to the TF10 Register Set for the particular Pass
///
/// @return None
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VOID SetTFFsToA1A4Maps(
    TF_REG*      pTFData,
    IPETFRegCmd* pPassRegCmd);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// SetTFConstantBlendingFactor
///
/// @brief  Setup TF10 Register constant blending factor Config based on common library output
///
/// @param  pTFData        Pointer to the Common Library Calculation Result
/// @param  pPassRegCmd    Pointer to the TF10 Register Set for the particular Pass
///
/// @return None
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VOID SetTFConstantBlendingFactor(
    TF_REG*      pTFData,
    IPETFRegCmd* pPassRegCmd);

CAMX_NAMESPACE_END

#endif // CAMXIPETF10REGISTER_H
